package cn.edu.aynu.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import cn.edu.aynu.pojo.Customer;

/**
 * 
 * MyCustomerDao (演示CustomerDao接口的继承)
 * 
 * @author 00fly
 * @version [版本号, 2021年3月23日]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
public interface MyCustomerDao extends CustomerDao
{
    // 通过ID查询客户
    @Select("select *  from customer where cust_id=#{value}")
    public Customer queryById(Integer id);
    
    // 通过ID删除客户
    @Delete("delete from customer where cust_id=#{value}")
    public int deleteCustomerById(Integer id);
    
    /**
     * 查询全部
     * 
     * @return
     * @see [类、类#方法、类#成员]
     */
    public List<Customer> queryAll();
}
